import axios from "@/setting/axios";
//训练计划管理接口

export function getAllList(params) {
  // console.log(`output->getAllList`, params);
  return axios.get("/admin/plan", {
    params,
  });
}

// 新增（单个）接口
export function addInfo(data) {
  console.log(`output->addInfo`, data);
  return axios.put("/admin/plan/info/add", data);
}

// 删除（单个）接口
export function deleteInfo(path) {
  console.log(`output->deleteInfo`, path);
  return axios.delete(`/admin/plan/info/${path}`);
}

// 修改（单个）接口
export function updateInfo(path, data) {
  console.log(`output->updateInfo`, path, data);
  return axios.post(`/admin/plan/info/${path}`, data);
}
